
package dieci.hibernate;

import dieci.database.PersistentObject;
import dieci.system.RawMaterial;

/**
 *
 * @author DuckSys
 */
public class HibRawMaterial implements PersistentObject{

    private String name;
    private int rawMaterialId;
    private double amount;
    private String messureUnit;
    private double price;
    private int deleted;
    
    public HibRawMaterial()
    {
    }

    public HibRawMaterial(RawMaterial material)
    {
        this.name = material.getName();
        this.amount = material.getAmount();
        this.messureUnit = material.getMessureUnit();
        this.price = material.getPrice();
        this.deleted = material.getDeleted();
    }
    
    public HibRawMaterial(int rawMaterialId, RawMaterial rawMaterial)
    {
        this(rawMaterial);
        this.rawMaterialId = rawMaterialId;        
    }

    public String getName()
    {
        return name;
    }

    public void setName(String name)
    {
        this.name = name;
    }

    public int getRawMaterialId()
    {
        return rawMaterialId;
    }

    public void setRawMaterialId(int rawMaterialId)
    {
        this.rawMaterialId = rawMaterialId;
    }

    public int getDeleted() {
        return deleted;
    }

    public void setDeleted(int deleted) {
        this.deleted = deleted;
    }

    /**
     * Get the value of price
     *
     * @return the value of price
     */
    public double getPrice()
    {
        return price;
    }

    /**
     * Set the value of price
     *
     * @param price new value of price
     */
    public void setPrice(double price)
    {
        this.price = price;
    }

    /**
     * Get the value of messureUnit
     *
     * @return the value of messureUnit
     */
    public String getMessureUnit()
    {
        return messureUnit;
    }

    /**
     * Set the value of messureUnit
     *
     * @param messureUnit new value of messureUnit
     */
    public void setMessureUnit(String messureUnit)
    {
        this.messureUnit = messureUnit;
    }

    /**
     * Get the value of amount
     *
     * @return the value of amount
     */
    public double getAmount()
    {
        return amount;
    }

    /**
     * Set the value of amount
     *
     * @param amount new value of amount
     */
    public void setAmount(double amount)
    {
        this.amount = amount;
    }

}
